﻿using SH.Common.CommonReturn;
using SH.Common.DataDictionary;
using SH.Multitenant.Infrastructure.Repository;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SH.Multitenant.Application.IServices.IDic
{
    public interface IDicServices
    {
        ISugarQueryable<Dic> All { get; }
        //数据字典增加
        Task<int> DicAddAsync(Dic dic);

        //数据字典删除
        Task<int> DicDeleteAsync(Dic dic);

        //数据字典修改
        Task<int> DicUpdAsync(Dic dic);
        //数据字典批量增加
        Task<int> DicBatchInsertAsync(List<Dic> list);
        //分页获取字典列表
        Task<ApiPaging<List<Dic>>> PagingDicsListAsync(string? identification, int pageSize, int pageIndex);
        //数据字典批量删除
        Task<int> BatchDicsDelAsync(List<Dic> list);

        //根据唯一标识获取字典实体
        Task<Dic> GetDicByIdAsync(int id);

        //根据标识列获取字典列表
        Task<List<Dic>> GetDicByIdentificationAsync(string identification);

        //获取省市级联列表
        List<Cascader> GetCascaderList();
    }
}
